import React, { Component } from 'react'
import { Button } from 'antd-mobile'

class Login extends Component {
  state = {
    username: '',
    password: ''
  }

  render() {
    let { username, password } = this.state
    return (
      <div>
        <div>
          <label>
            账号：
            <input type="text" value={username} onChange={e => this.setState({ username: e.target.value })} />
          </label>
        </div>
        <div>
          <label>
            账号：
            <input type="text" value={password} onChange={e => this.setState({ password: e.target.value })} />
          </label>
        </div>
        <div>
          <Button
            type="primary"
            onClick={() => {
              console.log(this.state)
            }}
          >
            用户登录
          </Button>
        </div>
      </div>
    )
  }
}

export default Login
